home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3n / t6sendto.z / t6sendto
Encoding:
Text File  |  2002-10-03  |  6.5 KB  |  133 lines

  1.  
  2.  
  3.  
  4. tttt6666sssseeeennnnddddttttoooo((((3333NNNN))))                                                      tttt6666sssseeeennnnddddttttoooo((((3333NNNN))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      t6sendto - Specify security attributes to send with data on a trusted
  10.      endpoint
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      cccccccc [[[[ ffffllllaaaaggggssss ............ ]]]] ffffiiiilllleeee
  14.  
  15.      #include <sys/t6attrs.h>
  16.  
  17.      iiiinnnntttt tttt6666sssseeeennnnddddttttoooo((((iiiinnnntttt ffffdddd,,,, ccccoooonnnnsssstttt cccchhhhaaaarrrr ****mmmmssssgggg,,,, iiiinnnntttt lllleeeennnn,,,, iiiinnnntttt ffffllllaaaaggggssss,,,,
  18.           ccccoooonnnnsssstttt ssssttttrrrruuuucccctttt ssssoooocccckkkkaaaaddddddddrrrr ****ttttoooo,,,, iiiinnnntttt ttttoooolllleeeennnn,,,,
  19.           ccccoooonnnnsssstttt tttt6666aaaattttttttrrrr____tttt aaaattttttttrrrr____ppppttttrrrr))));;;;
  20.  
  21. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  22.      _t_6_s_e_n_d_t_o() allows a privileged process to specify the security attributes
  23.      to send with an IPC message.  A process may only specify those attributes
  24.      for which it possesses the appropriate override privilege and need not
  25.      specify a full set.  Any unspecified attributes are supplied by the
  26.      kernel.
  27.  
  28.      _f_d is a socket created with _s_o_c_k_e_t(_3_N).  The address of the target is
  29.      given by _t_o with _t_o_l_e_n specifying its size.  The length of the message is
  30.      given by _l_e_n.
  31.  
  32.      The _t_o pointer and _t_o__l_e_n parameters are only used if you are specifying
  33.      the destination address, otherwise they should be set to _0.  You may not
  34.      specify the address if the trusted endpoint was created for a connection
  35.      oriented protocol, such as TCP.  If the message is too long to pass
  36.      atomically through the underlying protocol, then the error EEEEMMMMSSSSGGGGSSSSIIIIZZZZEEEE is
  37.      returned, and the message is not transmitted.
  38.  
  39.      A return value of -_1 indicates locally detected errors only.  It does not
  40.      implicitly mean the message was not delivered.
  41.  
  42.      tttt6666sssseeeennnnddddttttoooo(((()))) will return -1 and set errno to _E_I_N_V_A_L if any attempt is made
  43.      to specify a _t_6_a_t_t_r__t with any of these attributes: TTTT6666____NNNNAAAATTTT____CCCCAAAAVVVVEEEEAAAATTTTSSSS,
  44.      TTTT6666____AAAACCCCLLLL, TTTT6666____IIIILLLL, TTTT6666____PPPPIIIIDDDD, TTTT6666____RRRREEEESSSSVVVV11110000, TTTT6666____AAAAUUUUDDDDIIIITTTT____IIIINNNNFFFFOOOO.
  45.  
  46.      The _f_l_a_g_s parameter is formed from the bitwise OR of zero or more of the
  47.      following:
  48.  
  49.      MSG_OOB             Send out-of-band data and any security attributes
  50.                          specified by a privileged process on sockets that
  51.                          support this notion. The underlying protocol must
  52.                          also support out-of-band data.  Data and attributes
  53.                          sent with this flag are typically not subject to the
  54.                          internal buffering normally applied by the network to
  55.                          improve network efficiency.
  56.  
  57.      MSG_DONTROUTE       The SO_DONTROUTE option is turned on for the duration
  58.                          of the operation.  It is used only by diagnostic or
  59.                          routing programs.
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. tttt6666sssseeeennnnddddttttoooo((((3333NNNN))))                                                      tttt6666sssseeeennnnddddttttoooo((((3333NNNN))))
  71.  
  72.  
  73.  
  74.      The security attributes are specified by the _a_t_t_r__p_t_r parameter. To set
  75.      up _a_t_t_r__p_t_r, see _t_6_s_e_t__a_t_t_r(_3_N).
  76.  
  77. CCCCAAAAPPPPAAAABBBBIIIILLLLIIIITTTTIIIIEEEESSSS
  78.      Only a process with the appropriate override privileges can specify the
  79.      security attributes associated with the data it sends. To specify an
  80.      attribute, a process must have the override privilege corresponding to
  81.      the attribute.  The override privilege required to specify an attribute
  82.      is implementation specific.
  83.  
  84.      The same set of capabilities are required to set the outgoing attributes
  85.      of a message as tttt6666sssseeeetttt____eeeennnnddddpppptttt____ddddeeeeffffaaaauuuulllltttt does to set the endpoint defaults.
  86.  
  87. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  88.      The return value is the number of bytes actually sent, or the appropriate
  89.      error.
  90.  
  91.      It is critical that the return value always be checked, for the addition
  92.      of security means that access to an endpoint may be revoked in response
  93.      to a security violation.
  94.  
  95. EEEERRRRRRRROOOORRRRSSSS
  96.      [EBADF]        ffffdddd is an invalid file descriptor.
  97.  
  98.      [EINTR]        The operation was interrupted by delivery of a signal
  99.                     before any data could be buffered to be sent.
  100.  
  101.      [EINVAL]       _t_o_l_e_n is not the size of a valid address for the specified
  102.                     address family.
  103.  
  104.      [EMSGSIZE]     The socket requires that message be sent atomically, and
  105.                     the message was too long.
  106.  
  107.      [ENOMEM]       There was insufficient memory available to complete the
  108.                     operation.
  109.  
  110.      [ENOSR]        There were insufficient STREAMS resources available for
  111.                     the operation to complete.
  112.  
  113.      [ENOTSOCK]     _f_d is not a socket.
  114.  
  115. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  116.      libt6(3N), t6set_attr(3N), t6set_endpt_default(3N).
  117.  
  118. SSSSOOOOUUUURRRRCCCCEEEE
  119.      Trusted Systems Interoperability Group
  120.  
  121. NNNNOOOOTTTTEEEESSSS
  122.  
  123.  
  124.  
  125.  
  126.                                                                         PPPPaaaaggggeeee 2222
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.